package core.functions;

public class Problem{
	public static double minRange = -5.12;
	public static double maxRange = 5.12;
	
	public Problem(){}
	
	public static double EvaluateRastringin(double[] vector){
		int nDimensions = vector.length;
		
		double sum = 0.0;
        for (int i = 0; i < nDimensions; i++) {
                double xi = vector[i];
                sum += (xi * xi) - (10.0 * Math.cos(2.0 * Math.PI * xi));
        }
        return (10.0 * nDimensions) + sum;
	}
}
